//
//  firstTableViewCell.m
//  A段项目音乐播放
//
//  Created by dllo on 15/5/22.
//  Copyright (c) 2015年 lanou3g.com蓝鸥科技. All rights reserved.
//

#import "firstTableViewCell.h"
#import "firstModel.h"
#import "UIImageView+WebCache.h"
@implementation firstTableViewCell

//- (void)awakeFromNib
//{
//   
//}

-(void)dealloc
{

    [_imageview release];
    [_labelone release];
    [_labeltwo release];
    [super dealloc];
    

    


}


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        
        [self creataimage];
    }
    
    return self;
    
}

-(void)creataimage

{
    self.imageview =[[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 120, 120)];
    
    self.imageview.userInteractionEnabled =YES;
    
    self.imageview.layer.cornerRadius =10;
    
    self.imageview.clipsToBounds =YES;
    
    [self.contentView addSubview:self.imageview];
    
    self.labelone =[[UILabel alloc]initWithFrame:CGRectMake(145,50,100,40)];
    
    [self.contentView addSubview:self.labelone];
    
    self.labeltwo =[[UILabel alloc]initWithFrame:CGRectMake(145,75,240,40)];
    
    self.labeltwo.textColor =[UIColor grayColor];
    
    self.labeltwo.font =[UIFont systemFontOfSize:13];

    [self.contentView addSubview:self.labeltwo];


}


- (void)sendModel:(firstModel *)model
{
    [self.imageview sd_setImageWithURL:[NSURL URLWithString:model.pic_url] placeholderImage:nil];
    
    self.labelone.text =model.name;
    
    self.labeltwo.text =model.desc;

}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}

@end
